
#ifndef VOICESU03T_H
#define VOICESU03T_H

#include "HardwareSerial.h"



class VOICESU03T {
public:
    VOICESU03T(int8_t uart_num, int8_t tx_pin, int8_t rx_pin, uint32_t baud_rate);
    void begin();
    size_t write(uint8_t *data, size_t size);
    int read();
    int available();
    void setState(int8_t state);
    int8_t getState();
    long decimalToHex_big(long decimal);
    void voiceSpeechTime(long hour, long min);
    void voiceSpeechHumiture(long temp, long humi);
private:
    HardwareSerial *serial;
    int8_t _uart_num;
    int8_t _tx_pin;
    int8_t _rx_pin;
    uint32_t _baud_rate;
    int8_t _state;
};



#endif // ESP32_EXTRA_UART_H
